/******************************************************************************
 * Product: Adempiere ERP & CRM Smart Business Solution                       *
 * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved.                *
 * This program is free software, you can redistribute it and/or modify it    *
 * under the terms version 2 of the GNU General Public License as published   *
 * by the Free Software Foundation. This program is distributed in the hope   *
 * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.           *
 * See the GNU General Public License for more details.                       *
 * You should have received a copy of the GNU General Public License along    *
 * with this program, if not, write to the Free Software Foundation, Inc.,    *
 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.                     *
 * For the text or an alternative of this public license, you may reach us    *
 * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA        *
 * or via info@compiere.org or http://www.compiere.org/license.html           *
 *****************************************************************************/
/** Generated Model - DO NOT CHANGE */
package org.compiere.model;

import java.sql.ResultSet;
import java.util.Properties;

/** Generated Model for BCS_FRInputForm_Period
 *  @author Adempiere (generated) 
 *  @version Release 3.7.0LTS - $Id$ */
public class X_BCS_FRInputForm_Period extends PO implements I_BCS_FRInputForm_Period, I_Persistent 
{

	/**
	 *
	 */
	private static final long serialVersionUID = 20130614L;

    /** Standard Constructor */
    public X_BCS_FRInputForm_Period (Properties ctx, int BCS_FRInputForm_Period_ID, String trxName)
    {
      super (ctx, BCS_FRInputForm_Period_ID, trxName);
      /** if (BCS_FRInputForm_Period_ID == 0)
        {
			setBCS_FRInputForm_Period_ID (0);
			setC_Year_ID (0);
			setPeriodFrom (0);
			setPeriodTo (0);
        } */
    }

    /** Load Constructor */
    public X_BCS_FRInputForm_Period (Properties ctx, ResultSet rs, String trxName)
    {
      super (ctx, rs, trxName);
    }

    /** AccessLevel
      * @return 3 - Client - Org 
      */
    protected int get_AccessLevel()
    {
      return accessLevel.intValue();
    }

    /** Load Meta Data */
    protected POInfo initPO (Properties ctx)
    {
      POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
      return poi;
    }

    public String toString()
    {
      StringBuffer sb = new StringBuffer ("X_BCS_FRInputForm_Period[")
        .append(get_ID()).append("]");
      return sb.toString();
    }

	/** Set BCS_FRInputForm_Period ID.
		@param BCS_FRInputForm_Period_ID BCS_FRInputForm_Period ID	  */
	public void setBCS_FRInputForm_Period_ID (int BCS_FRInputForm_Period_ID)
	{
		if (BCS_FRInputForm_Period_ID < 1) 
			set_ValueNoCheck (COLUMNNAME_BCS_FRInputForm_Period_ID, null);
		else 
			set_ValueNoCheck (COLUMNNAME_BCS_FRInputForm_Period_ID, Integer.valueOf(BCS_FRInputForm_Period_ID));
	}

	/** Get BCS_FRInputForm_Period ID.
		@return BCS_FRInputForm_Period ID	  */
	public int getBCS_FRInputForm_Period_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_BCS_FRInputForm_Period_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	public org.compiere.model.I_C_Year getC_Year() throws RuntimeException
    {
		return (org.compiere.model.I_C_Year)MTable.get(getCtx(), org.compiere.model.I_C_Year.Table_Name)
			.getPO(getC_Year_ID(), get_TrxName());	}

	/** Set Year.
		@param C_Year_ID 
		Calendar Year
	  */
	public void setC_Year_ID (int C_Year_ID)
	{
		if (C_Year_ID < 1) 
			set_ValueNoCheck (COLUMNNAME_C_Year_ID, null);
		else 
			set_ValueNoCheck (COLUMNNAME_C_Year_ID, Integer.valueOf(C_Year_ID));
	}

	/** Get Year.
		@return Calendar Year
	  */
	public int getC_Year_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_C_Year_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	public org.compiere.model.I_C_Period getPeriodF() throws RuntimeException
    {
		return (org.compiere.model.I_C_Period)MTable.get(getCtx(), org.compiere.model.I_C_Period.Table_Name)
			.getPO(getPeriodFrom(), get_TrxName());	}

	/** Set PeriodFrom.
		@param PeriodFrom PeriodFrom	  */
	public void setPeriodFrom (int PeriodFrom)
	{
		set_Value (COLUMNNAME_PeriodFrom, Integer.valueOf(PeriodFrom));
	}

	/** Get PeriodFrom.
		@return PeriodFrom	  */
	public int getPeriodFrom () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_PeriodFrom);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	public org.compiere.model.I_C_Period getPerio() throws RuntimeException
    {
		return (org.compiere.model.I_C_Period)MTable.get(getCtx(), org.compiere.model.I_C_Period.Table_Name)
			.getPO(getPeriodTo(), get_TrxName());	}

	/** Set PeriodTo.
		@param PeriodTo PeriodTo	  */
	public void setPeriodTo (int PeriodTo)
	{
		set_Value (COLUMNNAME_PeriodTo, Integer.valueOf(PeriodTo));
	}

	/** Get PeriodTo.
		@return PeriodTo	  */
	public int getPeriodTo () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_PeriodTo);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}
	
}